<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php $this->load->view('include/html_head')?>
</head>
<body>
<div id="wrapper">
	<?php $this->load->view('include/header')?>
	<?php $this->load->view('include/menu')?>
	<div id="page">
		<div id="content">
		<?php $this->load->view('include/sub_navi')?>
			<div class="post">
				<p class="meta"><?php echo $photo_c_name?>管理</p>
				<div class="entry">
				
				<!-- <div style="float:left;"><img id="target" src="/images/0000.jpg"  /></div>
				<div style="width:48px;height:48px;margin:10px;overflow:hidden; float:left;"><img  style="float:left;" id="preview" src="/images/0000.jpg" /></div>
				<div style="width:190px;height:195px;margin:10px;overflow:hidden; float:left;"><img  style="float:left;" id="preview2" src="/images/0000.jpg" /></div>
				x<input type="text" id="x" name="x" />
				y<input type="text" id="y" name="y" />
				w<input type="text" id="w" name="w" />
				h<input type="text" id="h" name="h" /> -->
				
				<?php echo form_open_multipart('backend/society/upload/do_upload');?>
				<ul>
					<li>
					<style>
					.clear{clear:both;}
					.upload_show input{float:left; margin-top:10px;}
					.upload{float:left; margin-top:-25px; *margin-top:-40px; filter:alpha(opacity=0); -moz-opacity:0; opacity:0;}
					#upload_btn{float:left; margin-top:8.5px; margin-left:10px;}
					</style>
					<div class="upload_show">
					<input id="upload_text" type="text" size='20'/>
					<input id="upload_btn" type="image" class='anchor_button' value='浏览' style='font-size: 70%;'/>
					</div>
					<div class="clear"></div>
					<input type='hidden' name='category' value='<?php echo $category;?>' />
					<input type="file" name="userfile" onchange="upload_text.value=this.value" class="upload" />
					</li>
					<li>
					<button type='submit' >上传</button>
					<a class='anchor_button' onclick="history.back(-1);" >返回</a>
					<?php echo "<div class='error'>" . $error . "</div>";?>
					</li>
				</ul>
				<?php echo form_close();?>
				
				<?php if (!empty($img_list)):?>
				<table class='full'>
				<caption>您还能上传<span class='remaining_count'><?php echo $remaining_count ?></span>张<?php echo $photo_c_name;?>
				<span class='tip'>(为保证<?php echo $photo_c_name?>显示质量,请上传宽高比接近<?php echo $this->common_data->_get_society_photo_ratio_by_cid($category);?>的图片)</span>
				</caption>
				<thead>
					<tr>
						<th>已经上传的图片</th>
						<th>图片上传时间</th>
						<th>图片维护</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach($img_list as $k => $v):?>
					<tr>
						<td><a href='<?php echo BASE_URL . $v['photo_path'] ?>' rel='cb_img'><img src='<?php echo BASE_URL . $v['thumb_path'] ?>' alt='无法加载该图片' /></a><br /></td>
						<td><?php echo date('Y-m-d h:iA', $v['upload_time'])?></td>
						<td>
							<span><a href='<?php echo BACKEND_SOCIETY_UPLOAD_DELETE_PATH . $v['id']?>'>删除</a></span>
						</td>
					</tr>
					<?php endforeach;?>
				</tbody>
				</table>
				<?php endif;?>
				<?php if (empty($img_list)):?>
				<span class='tip'>该分类暂无上传的图片</span><br />
				<span class='tip'>(为保证<?php echo $photo_c_name?>显示质量,请上传宽高比接近<?php echo $this->common_data->_get_society_photo_ratio_by_cid($category);?>的图片)</span>
				<?php endif;?>
				</div>
			</div>
			<div style="clear: both;">&nbsp;</div>
		</div>
		<!-- end #content -->
		<?php $this->load->view('include/side_bar')?>
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
<?php $this->load->view('include/footer_content')?>
<?php $this->load->view('include/footer')?>
</body>
</html>
